for a in (False, True):
    for b in (False, True):
        for c in (False, True):
            for d in (False, True):
                f = int(((not a) and c) or (b and c) or (a and (not b)) or d)
                g = int((not (b and c)) or ((not a) and b) or (a and c) or d)
                print(f'{f},{g}')
